package com.jason.www.pubsub.core;

import org.springframework.context.ApplicationEvent;

/**
 * @author ybd
 * @date 17-11-8.
 */
public class EventLocalStore {
	private static final ThreadLocal<ApplicationEvent> EVENT_THREAD_LOCAL = new ThreadLocal<>();

	public static void setEvent(ApplicationEvent e) {
		EVENT_THREAD_LOCAL.set(e);
	}

	public static ApplicationEvent getEvent() {
		return EVENT_THREAD_LOCAL.get();
	}

	public static void remove() {
		EVENT_THREAD_LOCAL.remove();
	}
}
